$(function () {
    $('#page').load('page.html');
})


function FindAll() {
    let da={
        userName:localStorage.getItem("username"),
        startSubmissionDate:$.trim($("#startSubmissionDate").val()),
        endSubmissionDate:$.trim($("#endSubmissionDate").val()),
        coach:$.trim($("#coach").val()),
        supervision:$.trim($("#supervision").val()),
        state:$("#state").val(),
        pageSize:$("#pageSize").val(),
        pageNum:$("#pageNum").val(),
    }
    let data=myAjax("/daily/myDailyFind",da,"post");
    $("#pageCount").text(data.data.total);
    data=data.data.list;
    let html='';
    let state='';
    for (let i=0 ;i<data.length; i++){
        if (data[i].state==1){
            state="已提交";
        }else if (data[i].state==2){
            state="已查看";
        }else if (data[i].state==3){
            state="草稿";
        }
        html +='        <tr>\n' +
            '            <td>'+data[i].id+'</td>\n' +
            '            <td>'+data[i].dailyType+'</td>\n' +
            '            <td>'+data[i].userName+'</td>\n' +
            '            <td>'+data[i].submissionDate+'</td>\n' +
            '            <td>'+data[i].major+'</td>\n' +
            '            <td>'+data[i].coach+'</td>\n' +
            '            <td>'+data[i].supervision+'</td>\n' +
            '            <td><div class="biaos">'+data[i].learningContent+'</div></td>\n' +
            '            <td><div class="biaos">'+data[i].harvest+'</div></td>\n' +
            '            <td><div class="biaos">'+data[i].insufficient+'</div></td>\n' +
            '            <td><div class="biaos">'+data[i].opinion+'</div></td>\n' +
            '            <td><div class="biaos">'+state+'</div></td>\n' +
            '        </tr>';
    }
    $("#dailyFandAll").html(html);
}